home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / menu_usa / test.fr_ / test.fr (.txt)
Encoding:
Visual Basic Form  |  1998-01-08  |  3.5 KB  |  115 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Demo MenuX.Ocx"
  4.    ClientHeight    =   4230
  5.    ClientLeft      =   705
  6.    ClientTop       =   1380
  7.    ClientWidth     =   7710
  8.    Height          =   4920
  9.    Left            =   645
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4230
  12.    ScaleWidth      =   7710
  13.    Top             =   750
  14.    Width           =   7830
  15.    Begin VB.CommandButton Command3 
  16.       Caption         =   "Load"
  17.       Height          =   255
  18.       Left            =   5400
  19.       TabIndex        =   4
  20.       TabStop         =   0   'False
  21.       Top             =   3960
  22.       Width           =   735
  23.    End
  24.    Begin VB.CommandButton Command2 
  25.       Caption         =   "About"
  26.       Height          =   255
  27.       Left            =   6960
  28.       TabIndex        =   3
  29.       TabStop         =   0   'False
  30.       Top             =   3980
  31.       Width           =   735
  32.    End
  33.    Begin VB.CommandButton Command1 
  34.       Caption         =   "Clear"
  35.       Height          =   255
  36.       Left            =   6180
  37.       TabIndex        =   1
  38.       TabStop         =   0   'False
  39.       Top             =   3980
  40.       Width           =   735
  41.    End
  42.    Begin VB.ListBox List1 
  43.       Height          =   3960
  44.       IntegralHeight  =   0   'False
  45.       Left            =   0
  46.       TabIndex        =   0
  47.       TabStop         =   0   'False
  48.       Top             =   0
  49.       Width           =   6255
  50.    End
  51.    Begin MENUXLib.MenuX MenuX1 
  52.       Left            =   6480
  53.       Top             =   2160
  54.       _Version        =   65536
  55.       _ExtentX        =   1931
  56.       _ExtentY        =   1720
  57.       _StockProps     =   0
  58.    End
  59.    Begin VB.Label Label1 
  60.       BorderStyle     =   1  'Fixed Single
  61.       Height          =   255
  62.       Left            =   0
  63.       TabIndex        =   2
  64.       Top             =   3975
  65.       Width           =   5415
  66.    End
  67.    Begin VB.Menu tmp 
  68.       Caption         =   "tmp"
  69.    End
  70. Attribute VB_Name = "Form1"
  71. Attribute VB_Creatable = False
  72. Attribute VB_Exposed = False
  73. Private Sub Command1_Click()
  74. MenuX1.Clear
  75. End Sub
  76. Private Sub Command2_Click()
  77. MenuX1.AboutBox
  78. End Sub
  79. Private Sub Command3_Click()
  80. a$ = InputBox$("Filename", "Load")
  81. If Len(a$) Then MenuX1.Load a$
  82. End Sub
  83. Private Sub Form_Load()
  84. MenuX1.hWnd = Me.hWnd
  85. MenuX1.Load "test.menu"
  86. End Sub
  87. Private Sub Form_Resize()
  88. If Me.WindowState = 1 Then Exit Sub
  89. If Me.ScaleHeight < 500 Then Exit Sub
  90. If Me.ScaleWidth < 1500 Then Exit Sub
  91. List1.Width = Me.ScaleWidth
  92. List1.Height = Me.ScaleHeight - Label1.Height
  93. Label1.Top = Me.ScaleHeight - Label1.Height
  94. Label1.Width = Me.ScaleWidth - Command1.Width * 3 - 50
  95. Command1.Left = Label1.Width + 50 + Command1.Width
  96. Command1.Top = Me.ScaleHeight - Label1.Height
  97. Command2.Left = Label1.Width + 50
  98. Command2.Top = Me.ScaleHeight - Label1.Height
  99. Command3.Left = Label1.Width + 50 + Command1.Width * 2
  100. Command3.Top = Me.ScaleHeight - Label1.Height
  101. End Sub
  102. Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  103. If Button = 2 Then MenuX1.PopupMenu 200, 0, X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY
  104. End Sub
  105. Private Sub MenuX1_Help(ByVal id As Integer)
  106. MsgBox "Hilfe-Nummer" + Str$(id), , "Hilfe"
  107. End Sub
  108. Private Sub MenuX1_Click(ByVal id As Integer)
  109. List1.AddItem MenuX1.Caption(id)
  110. List1.TopIndex = List1.ListCount - 1
  111. End Sub
  112. Private Sub MenuX1_Select(ByVal id As Integer)
  113. Label1.Caption = MenuX1.Caption(id)
  114. End Sub
  115.